<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>blogs</title>

    <!-- Bootstrap -->
    <link href="/blogs/static/css/bootstrap.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/blogs/static/css/index.css">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style type="text/css">

        .hanshu{
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .hanshu {
            height: 3.6em;
            font-size: 16px;
            color: #999;
            line-height: 1.8;
            overflow: hidden;
            position: relative;

        &:after {
            content: '';
            text-align: right;
            position: absolute;
            bottom: 0;
            right: 0;
            width: 10%;
            height: 1.8em;
            background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1) 50%);
         }

        }



        #fabu{
            color: white;
        }


        .title{
            color: #333;
        }
        .title:hover{
            color: #000000;
        }

        .boer{border: none; border-bottom: 1px solid #ddd;}
    </style>
</head>
<body>

<!-- 右下角按钮 -->
<!-- <button class="btn btn-default btn_right_bottom">写</button> -->
<!-- 导航条 -->
<nav class="navbar navbar-default" role="navigation">
    <div class="navbar navbar-inverse">
        <div class="container">
            <div class="navbar-collapse collapse ">
                <ul class="nav navbar-nav" style="clear: both">
                    <li class="active"><a class="navitme" href="#">首页</a> </li>
                    <li><a class="navitme" href="#">欢迎来到吴宇浩个人博客~</a> </li>
                </ul>
                <?if(isNotEmpty(session.user)){?>
                <ul class="nav navbar-nav navbar-right">
                    <li><a href="#"><span class=""></span>hello~ </a></li>
                </ul>
                <?}else{?>
                <ul class="nav navbar-nav navbar-right">
                    <li><a href="/blogs/index.html"><span class="glyphicon glyphicon-log-in"></span> 登录</a></li>
                </ul>
                <?}?>
            </div>
        </div>
    </div>
</nav>
<!-- 图片轮播 -->
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
    <!-- Indicators -->
    <ol class="carousel-indicators">
        <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
        <li data-target="#carousel-example-generic" data-slide-to="1"></li>
        <li data-target="#carousel-example-generic" data-slide-to="2"></li>
        <li data-target="#carousel-example-generic" data-slide-to="3"></li>
        <li data-target="#carousel-example-generic" data-slide-to="4"></li>
        <li data-target="#carousel-example-generic" data-slide-to="5"></li>
    </ol>
    
    <!-- Wrapper for slides -->
    <div class="carousel-inner" role="listbox">
        <div class="item active">
            <img src="/blogs/static/img/ic_p4.jpg">
            <p class="carousel-caption">
            </p>
        </div>
        <div class="item">
            <img src="/blogs/static/img/ic_p5.jpg">
            <p class="carousel-caption">
            </p>
        </div>
        <div class="item">
            <img src="/blogs/static/img/ic_p6.jpg">
            <p class="carousel-caption">
            </p>
        </div>
        <div class="item">
            <img src="/blogs/static/img/ic_p7.jpg">
            <p class="carousel-caption">
            </p>
        </div>
        <div class="item">
            <img src="/blogs/static/img/ic_p8.jpg">
            <p class="carousel-caption">
            </p>
        </div>
        <div class="item">
            <img src="/blogs/static/img/ic_p9.jpg">
            <p class="carousel-caption">
            </p>
        </div>
    </div>

    <!-- Controls -->
    <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
        <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
        <span class="sr-only">Previous</span>
    </a>
    <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
        <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
        <span class="sr-only">Next</span>
    </a>
</div>


<!-- 功能模块 -->

<!-- 技术日记 -->
<div class="container div_divider">
    <!-- 分割线 -->
    <hr class="hr_1">Bigname Technology World !<hr class="hr_2">
    <div class="row">

        <!-- 文章列表 -->
        <div class="col-xs-9">
            <div class="list-group div_article">
                <!-- 子头栏 -->
                <a href="#" class="list-group-item active item_article_first">
                    <h3 class="list-group-item-heading">
                        推 荐 文 章
                    </h3>
                </a>
                <!-- 文章列表 -->
                <?for(article in articleList){?>
                <div class="list-group-item item_article">
                    <div class="row">
                        <div class="div_center col-xs-9">
                            <div class="list-group-item-heading div_article_title">
                                <a class="title" href="/blogs/articleController/details?id=${article.id}">
                                    <strong>
                                        ${article.tit}
                                    </strong>
                                </a>
                            </div>
                                <p class="list-group-item-text div_article_content hanshu">
                                    ${article.content}
                                </p>
                            <br>
                            <div class="time">
                                <span class="glyphicon glyphicon-time" style="color:#b9def0;"></span>&nbsp;${article.createTime,"YYYY-MM-dd HH:mm"} &nbsp;&nbsp;&nbsp;&nbsp;
                                <span class="glyphicon glyphicon-eye-open" style="color:#b9def0"></span>&nbsp;浏览：211&nbsp;&nbsp;&nbsp;&nbsp;
                                <span class="glyphicon glyphicon-thumbs-up" style="color:#b9def0"></span>&nbsp;&nbsp;200</div>
                        </div>
                        <!-- 右侧图片，信息 -->
                        <div class="col-xs-3 div_right_info">
                            <img class="iv_article img-rounded" src="/blogs/static/img/ic_android1.jpg">
                        </div>
                    </div>
                </div>
                <?}?>
            </div>
        </div>
        <!-- 右侧 -->
        <div class="col-xs-3 div_record">
            <!-- 用户信息 -->
            <div class="jumbotron div_userinfo">
                <img class="iv_user_head img-circle" src="/blogs/static/img/ic_p5.jpg">
                <div style="display: inline-block; margin-left: 12px;font-size: 18px;">吴宇浩个人博客</div>
            </div>
            <!-- 随手记录 -->
            <div style="display: flex;">
                <div style="flex: 1"><hr></div>
                <div style="text-align: center;line-height: 48px;color: #34374C">记录美好的心情</div>
                <div style="flex: 1"><hr></div>
            </div>
            <?if(isNotEmpty(session.user)){?>
                <div class="div_save">
                    <a id="fabu" href="/blogs/articleController/getIssuePage"><button type="button" class="btn btn-primary btn_save_record">发表博客</button></a>
                </div>
            <?}?>
            <hr>
        </div>
        <div class="col-xs-3 div_record">
            <!-- 用户信息 -->
            <div class="jumbotron div_userinfo" style="text-align: center;">
                <!--<img class="iv_user_head img-circle" src="/blogs/static/img/ic_p5.jpg">-->
                <div style="display: inline-block; font-size: 18px;">文章排行榜</div>
            </div>
            <!-- 随手记录 -->
            <table class="table">
                <tbody>
                <?for(article in articleList){?>
                <tr>
                    <td class="boer">${article.tit}</td>
                </tr>
                <?}?>
                </tbody>
            </table>
        </div>
        <div class="col-xs-3 div_record">
            <!-- 用户信息 -->
            <div class="jumbotron div_userinfo" style="text-align: center;">
                <!--<img class="iv_user_head img-circle" src="/blogs/static/img/ic_p5.jpg">-->
                <div style="display: inline-block; font-size: 18px;">分类</div>
            </div>
            <!-- 随手记录 -->
            <table class="table">
                <tbody>
                    <tr>
                        <td class="boer">Java</td>
                    </tr>
                    <tr>
                        <td class="boer">C++</td>
                    </tr>
                    <tr>
                        <td class="boer">Python</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <!-- 登录模态框 -->
    <div class="modal fade bs-example-modal-sm" id="loginModal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
        <div class="modal-dialog modal-sm" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <div class="modal-title" id="myModalLabel" style="text-align: center;">登录</div>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal" style="padding: 12px;">
                        <div class="form-group">
                            <input type="text" class="form-control" id="inputEmail3" placeholder="账户名">
                        </div>
                        <div class="form-group">
                            <input type="password" class="form-control" id="inputPassword3" placeholder="密码">
                        </div>
                    </form>
                </div>
                <div class="modal-footer" style="text-align: center;">
                    <button type="button" class="btn btn-primary" style="width: 100%">Login</button>
                </div>
            </div>
        </div>
    </div>
    </div>


<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="/blogs/static/js/jquery-3.3.1.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="/blogs/static/js/bootstrap.min.js"></script>
<script src="/blogs/static/js/init.js" type="text/script"></script>
<script src="/blogs/static/js/util.js"></script>
</body>
</html>